﻿User = function() 
{
	this.userList_so = SharedObject.get( "userList", false );
}

User.prototype.saveUser = function( first, last, forwarder) 
{
	this.userList_so.send( "savedUser", first, last, forwarder);
}

user = new User();

application.onConnect = function( client )
{

	client.user	= user;

	application.acceptConnection( client );
	
}

//application.onAppStart = function (){ 
//    trace ("*** Whiteboard application start"); 
 
//    application.users_list = SharedObject.get("users_list", false); 
     
    // Prevent clients from updating the shared object. 
    //application.entries_so.lock(); 
     
    // Allow clients to update the shared object. 
    //application.entries_so.unlock(); 
    trace("*** onAppStart called."); 
//};

//application.onConnect = function(client){ 
//    trace("onConnect called"); 
//    application.acceptConnection( client );
//}
